<tagLib name="html" />

<include file="Public:header" />

<div class="container" id="cpcontainer">
    <h3>{$Think.lang.manage_question} :: 
    <switch name="action">
        <case value="delete">{$Think.lang.delete_selected}</case>
        <case value="lock">{$Think.lang.lock_selected}</case>
        <case value="move">{$Think.lang.move_selected}</case>
    </switch>
    </h3>
    
    <form name="cpform" method="post" action="__URL__/manageQuestion">
    <input type="hidden" name="op" value="save" />
    <input type="hidden" name="action" value="{$action}" />
    
    <table class="tb tb2">
    <switch name="action">
        <case value="delete">
        <tr class="nobg"><td colspan="2" class="td27">{$Think.lang.del_confirm}</td></tr>
        <tr>
            <td class="vtop rowform">
                <html:radio name="delete_confirm" radios="deleteConfirmRadios" checked="deleteConfirmChecked" separator=" " />
            </td>
            <td class="vtop tips2"></td>
        </tr>
        </case>
        <case value="lock">
        <tr class="nobg"><td colspan="2" class="td27">{$Think.lang.lock_action_type}:</td></tr>
        <tr>
            <td class="vtop rowform">
                <html:radio name="is_locked" radios="lockRadios" checked="lockChecked" separator=" " />
            </td>
            <td class="vtop tips2"></td>
        </tr>
        </case>
        <case value="move">
        <tr class="nobg"><td colspan="2" class="td27">{$Think.lang.target_category}:</td></tr>
        <tr>
            <td class="vtop rowform">
                <select name="category_id">
                    {$categoryOptions}
                </select>
            </td>
            <td class="vtop tips2"></td>
        </tr>
        </case>
    </switch>
        <tr class="nobg">
            <td colspan="15">
                <input class="btn" type="submit" value="{$Think.lang.submit}" />&nbsp;
                <input type="checkbox" name="chkall" id="chkall" class="checkbox" checked="checked" onclick="checkAll('prefix', this.form, 'mods')" /><label for="chkall">{$Think.lang.check_all}</label>
            </td>
        </tr>
    </table>
    <table class="tb tb2 fixpadding tablesorter" id="myTable">
        <thead>
        <tr>
            <th>{$Think.lang.question_title}</th>
            <th>{$Think.lang.question_asker}</th>
            <th>{$Think.lang.question_answer_count}</th>
            <th>{$Think.lang.question_view_count}</th>
            <th>{$Think.lang.question_status}</th>
            <th>{$Think.lang.question_locked}</th>
            <th>{$Think.lang.question_submit_date}</th>
            <th width="10%">{$Think.lang.mark}</th>
        </tr>
        </thead>
        <tbody>
        <volist name="questionList" id="vo">
        <tr class="item">
            <td><a href="{$vo.question_id|format_question_url=$vo['title']}" title="{$vo.title}" target="_blank">{$vo.title|kg_substr=0,45}</a></td>
            <td><a href="{$vo.poster_id|format_user_url=$vo['poster_name']}" title="View User Profile" target="_blank">{$vo.poster_name}</a></td>
            <td>{$vo.answer_count}</td>
            <td>{$vo.view_count}</td>
            <td>{$vo.status|get_question_status}</td>
            <td><eq name="vo.is_locked" value="1">{$Think.lang.yes}<else/>{$Think.lang.no}</eq></td>
            <td>{$vo.create_time|format_date}</td>
            <td><input type="checkbox" class="checkbox" name="mods[]" value="{$vo.question_id}" checked="checked" /></td>
        </tr>
        </volist>
        <tbody>    
    </table>
    </form>
</div>

<include file="Public:footer" />
